﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;

namespace WMILK_MVC4.App_Start
{
    public class Languages
    {
        private const string LanguageUSPath = "WMILK_MVC4.Resources.String.US";

        private const string LanguageVNPath = "WMILK_MVC4.Resources.String.VN";

        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Resources.ResourceManager ResourceManager
        {
            get
            {
                System.Resources.ResourceManager resourceMan = null;

                switch (AccountHelper.SelectedLanguage)
                {
                    case Models.Enums.LanguageMode.English:
                        global::System.Resources.ResourceManager eng = new global::System.Resources.ResourceManager(LanguageUSPath, typeof(Languages).Assembly);

                        resourceMan = eng;
                        break;
                    case Models.Enums.LanguageMode.Vietnamese:
                        global::System.Resources.ResourceManager viet = new global::System.Resources.ResourceManager(LanguageVNPath, typeof(Languages).Assembly);

                        resourceMan = viet;
                        break;
                }

                return resourceMan;
            }
        }

        public static System.Resources.ResourceManager GetResourceUS()
        {
            return new System.Resources.ResourceManager(LanguageVNPath, Assembly.GetExecutingAssembly());
        }
    }
}